FROM ubuntu
MAINTAINER Captain Dao <support@daocloud.io>
RUN apt-get update \  
    && apt-get -y install \
        curl \
        wget \
        apache2 \
        libapache2-mod-php \
        php-mysql \
        php-gd \
        php-curl \
        php-pear \
    && apt-get clean \
    && apt-get autoclean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
    && curl -sS https://getcomposer.org/installer \
        | php -- --install-dir=/usr/local/bin --filename=composer
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf \
    && sed -i 's/variables_order.*/variables_order = "EGPCS"/g' \
        /etc/php5/apache2/php.ini
RUN mkdir -p /app && rm -rf /var/www/html && ln -s /app /var/www/html  
COPY . /app  
WORKDIR /app  
RUN chmod 755 ./start.sh
EXPOSE 80  
CMD ["./start.sh"] 